import {fromJS} from "immutable";
import * as constants from './constants';
const defaultState = fromJS({
    topicList: [],
    articleList: [],
    recommendList: [],
    articlePage: 1,
    showScroll: false
});
export default (state = defaultState, action) => {

    switch (action.type) {
        case constants.CHANGE_HOME_DATA:
            // console.log(action)
            return state.merge({
                topicList:fromJS(action.topicList),
                articleList:fromJS(action.articleList),
                recommendList:fromJS(action.recommendList),
            })
        default:
            return state;
    }

}